<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<sec:authentication property="principal" var="currentPrincipal" scope="page"/>

<fmt:setBundle basename="ApplicationMessage"/>
<fmt:setLocale value="zh_CN"/>

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp" %>
  <%@ include file="/WEB-INF/include/css.jsp" %>

</head>

<body class="ms-theme-blue">

	<%@ include file="/WEB-INF/include/header.jsp" %>
	<%@ include file="/WEB-INF/include/submenu.jsp" %>
	
	<div class="container-fluid ms-container has-ms-sidemenu">
	
	    <ol class="ms-breadcrumb breadcrumb">
	        <li class="active">异常运力管理</li>
	    </ol>
	
	    <div class="ms-content-layout">
	    
	      <div class="alert alert-warning" role="alert">
	        <strong>
	            异常调度锁定原因：1.车辆未绑定司机，2.牵引车和挂车的行驶证年检有效期过期<br/>
                 异常调度解锁条件<span style="font-weight: bolder; color: #ff0000;">（同时满足3个条件）</span>：1.车辆审核通过，2.司机审核通过，3车辆绑定司机<br/>
	        </strong>
	      </div>
	
        <div class="ms-operation-bar no-margin no-bottom-border clearfix">
           <div class="ms-operation-group pull-right">
              <a href="${ctx.host}/abnormal-capacity-declare/search" data-target="#search" data-toggle="modal" class="btn ms-btn ms-btn-blue">
                <i class="glyphicon glyphicon-search"></i>&nbsp;&nbsp;过滤查询
              </a>
           </div>
        </div>
	
        <table class="table table-hover ms-table">
            <thead>
	            <tr>
	              <th>序号</th>
	              <th>牵引车车牌号</th>
	              <th class="text-center">所属公司代码</th>
	              <th>所属公司名称</th>
	              <th>操作记录</th>
	              <th>操作时间</th>
	              <th>操作人</th>
	              <th>锁定原因</th>
	              <th class="text-center">操作</th>
	            </tr>
            </thead>

            <tbody>
              <c:forEach var="record" items="${vehicleSourceLockRecords}" varStatus="status">
                <c:set var="supplier" value="${record.vehicleSource.supplier}" />
                <tr>
                  <td>${status.index+1}</td>
                  <td>${record.vehicleSource.tractorBrandCode}</td>
                  <td class="text-center">${supplier.code}</td>
                  <td>${supplier.name}</td>
                  <td>${record.status.description}</td>
                  <td><fmt:formatDate value="${record.createTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
                  <td>${empty record.operator ? 'system' : persist.user(record.operator).name}</td>
                  <td>
                    ${record.description}
                  </td>
                  <td class="text-center">
                    <a href="${ctx.host}/abnormal-capacity-declare/${record.id}/unlock" data-target="#unlock" data-toggle="modal">解锁</a>&nbsp;&nbsp;
                  </td>
                </tr>
              </c:forEach>
            </tbody>

            <tfoot>
            <tr>
                <td colspan="10" class="no-vertical-padding">
                    <div class="pull-left">
                        <jsp:include page="/WEB-INF/include/page.jsp">
                            <jsp:param name="url" value="abnormal-capacity-declare"/>
                            <jsp:param name="queryString" value="${queryString}"/>
                        </jsp:include>
                    </div>
                </td>
            </tr>
            </tfoot>
        </table>
	
	    </div>
	</div>
	
	<%@ include file="/WEB-INF/include/script.jsp" %>
	<d:resource type="script" root="${ctx.resource}/build" src="js/page/supplier/capacity/abnormal-capacity-declare-list.js"/>
	<script type="text/javascript">
    require(['page/supplier/capacity/abnormal-capacity-declare-list'], function (page) {
      page.init()
    })
	</script>

</body>
</html>

